import java.util.Scanner;
public class Main{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        Employee employee1=new Manager();
        int salary= scan.nextInt();
        System.out.println(employee1.getSalary(salary));

        Employee employee2=new Salesman();
        salary= scan.nextInt();
        int improve=scan.nextInt();
        int salary2=salary+improve;
        System.out.println(employee2.getSalary(salary2));

        Employee employee3=new Worker();
        salary= scan.nextInt();
        int day=scan.nextInt();
        int salary3=salary*day;
        System.out.println(employee3.getSalary(salary3));
    }
}

class Employee{
    int salary;
    public int getSalary(int salary){
        return 0;
    }
}
class Manager extends Employee{
    public int getSalary(int salary){
        return salary;
    }
}
class Salesman extends Employee{
    public int getSalary(int salary){
        return salary;
    }
}
class Worker extends Employee{
    public int getSalary(int salary){
        return salary;
    }
}